package com.example.mymvp.model;

import com.example.mymvp.R;
import com.example.mymvp.Start;

import java.util.ArrayList;
import java.util.List;

public class SratModel implements  IBaseModel{


    @Override
    public void getStartList(OnLoaderListenter onLoaderListenter) {
//        正常发回
        onLoaderListenter.onComplete(initdata());
//        错误
        onLoaderListenter.onError("错误");
    }
    private List<Start> initdata(){
        List<Start> list = new ArrayList<>();
        for (int i = 0; i < 20; i++) {
            list.add(new Start(R.drawable.ic_launcher_background,"name"+i,"fans100"+i));
        }
        return list;
    }
}
